package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.domain.Book;
import com.itheima.mapper.HelloMapper;
import com.itheima.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service(interfaceClass = HelloService.class)
@Transactional
public class HelloServiceImpl implements HelloService {

    @Autowired
    private HelloMapper helloMapper;


    public String sayHello(String name) {
        return "hello"+name;
    }

    @Override
    public List<Book> findAll() {
        return helloMapper.findAll();
    }

    @Override
    public void delete(int id) {
        helloMapper.delete(id);
    }

    @Override
    public void update(int id, String bookname) {
        helloMapper.update(id,bookname);
    }


}
